package com.firebird.app.fekpsl.mvp.exam

import com.firebird.app.fekpsl.base.BasePresenter
import com.firebird.app.fekpsl.ext.ss

/**
 * Created by firebird on 2018/4/21.
 */
class ExamPresenter : BasePresenter<ExamContract.Model, ExamContract.View>(), ExamContract.Presenter {

    override fun createModel(): ExamContract.Model? = ExamModel()

    override fun getSingleAnswerList(subjectId: Int) {
        mModel?.getSingleAnswerList(subjectId)?.ss(mModel,mView){
            mView?.showSingleAnswerList(it.data)
        }
    }
    override fun getMultipleAnswerList(subjectId: Int) {
        mModel?.getMultipleAnswerList(subjectId)?.ss(mModel,mView){
            mView?.showMultipleAnswerList(it.data)
        }
    }
    override fun getTrueFalseQuestionList(subjectId: Int) {
        mModel?.getTrueFalseQuestionList(subjectId)?.ss(mModel,mView){
            mView?.showTrueFalseQuestionList(it.data)
        }
    }
    override fun getBlankFillingQuestionList(subjectId: Int) {
        mModel?.getBlankFillingQuestionList(subjectId)?.ss(mModel,mView){
            mView?.showBlankFillingQuestionList(it.data)
        }
    }
}